package client_gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JComboBox;

import client_controllers.ClassifyProductController;
import client_controllers.EmployeeLoginController;
import client_controllers.MarketingManagerController;

import java.awt.Color;

public class ClassifyProductGUI extends JFrame {

	private JPanel contentPane;
	private JButton btnNext1;
	private JButton btnNext2;
	private JButton btnClassify;
	private JComboBox comboBoxProduct;
	private JComboBox comboBoxType;
	private JComboBox comboBoxCategory;
	private JButton btnBack;
	private JButton btnLogout;
	private JPanel panel_1;
	private JPanel panel_2;
	private JLabel lblError;

	public ClassifyProductGUI(MarketingManagerController mmc,EmployeeLoginController elc) {
		setBounds(100, 100, 450, 357);
		setTitle("Classify Product To Type&Category");
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBounds(0, 0, 434, 90);
		contentPane.add(panel);
		panel.setLayout(null);
		
		JLabel lblSelectProduct = new JLabel("Select Product");
		lblSelectProduct.setForeground(new Color(255, 69, 0));
		lblSelectProduct.setBounds(144, 11, 120, 14);
		panel.add(lblSelectProduct);
		
		btnBack = new JButton("Back");
		btnBack.setBounds(335, 11, 89, 23);
		panel.add(btnBack);
		
		btnLogout = new JButton("Logout");
		btnLogout.setBounds(335, 45, 89, 23);
		panel.add(btnLogout);
		
		comboBoxProduct = new JComboBox();
		comboBoxProduct.setBounds(129, 36, 120, 20);
		panel.add(comboBoxProduct);
		
		btnNext1 = new JButton("Next");
		btnNext1.setBounds(140, 67, 89, 23);
		panel.add(btnNext1);
		
		panel_1 = new JPanel();
		panel_1.setVisible(false);
		panel_1.setBounds(0, 90, 434, 90);
		contentPane.add(panel_1);
		panel_1.setLayout(null);
		
		JLabel lblSelectType = new JLabel("Select Type");
		lblSelectType.setForeground(new Color(255, 69, 0));
		lblSelectType.setBounds(156, 11, 96, 14);
		panel_1.add(lblSelectType);
		
		comboBoxType = new JComboBox();
		comboBoxType.setBounds(129, 35, 123, 20);
		panel_1.add(comboBoxType);
		
		btnNext2 = new JButton("Next");
		btnNext2.setBounds(139, 66, 89, 23);
		panel_1.add(btnNext2);
		
		panel_2 = new JPanel();
		panel_2.setVisible(false);
		panel_2.setBounds(0, 179, 434, 140);
		contentPane.add(panel_2);
		panel_2.setLayout(null);
		
		JLabel lblSelectCategory = new JLabel("Select Category");
		lblSelectCategory.setForeground(new Color(255, 69, 0));
		lblSelectCategory.setBounds(154, 11, 91, 21);
		panel_2.add(lblSelectCategory);
		
		comboBoxCategory = new JComboBox();
		comboBoxCategory.setBounds(133, 43, 114, 20);
		panel_2.add(comboBoxCategory);
		
		btnClassify = new JButton("Classify");
		btnClassify.setBounds(143, 74, 89, 23);
		panel_2.add(btnClassify);
		
		lblError = new JLabel("Error");
		lblError.setVisible(false);
		lblError.setBounds(122, 108, 157, 14);
		panel_2.add(lblError);
		setVisible(true);
		ClassifyProductController cpc=new ClassifyProductController(this, elc,mmc);
		
	}

	public JLabel getLblError() {
		return lblError;
	}

	public void setLblError(JLabel lblError) {
		this.lblError = lblError;
	}

	public JButton getBtnNext1() {
		return btnNext1;
	}

	public void setBtnNext1(JButton btnNext1) {
		this.btnNext1 = btnNext1;
	}

	public JButton getBtnNext2() {
		return btnNext2;
	}

	public void setBtnNext2(JButton btnNext2) {
		this.btnNext2 = btnNext2;
	}

	public JButton getBtnClassify() {
		return btnClassify;
	}

	public void setBtnClassify(JButton btnClassify) {
		this.btnClassify = btnClassify;
	}

	public JComboBox getComboBoxProduct() {
		return comboBoxProduct;
	}

	public void setComboBoxProduct(JComboBox comboBoxProduct) {
		this.comboBoxProduct = comboBoxProduct;
	}

	public JComboBox getComboBoxType() {
		return comboBoxType;
	}

	public void setComboBoxType(JComboBox comboBoxType) {
		this.comboBoxType = comboBoxType;
	}

	public JComboBox getComboBoxCategory() {
		return comboBoxCategory;
	}

	public void setComboBoxCategory(JComboBox comboBoxCategory) {
		this.comboBoxCategory = comboBoxCategory;
	}

	public JButton getBtnBack() {
		return btnBack;
	}

	public void setBtnBack(JButton btnBack) {
		this.btnBack = btnBack;
	}

	public JButton getBtnLogout() {
		return btnLogout;
	}

	public void setBtnLogout(JButton btnLogout) {
		this.btnLogout = btnLogout;
	}

	public JPanel getPanel_1() {
		return panel_1;
	}

	public void setPanel_1(JPanel panel_1) {
		this.panel_1 = panel_1;
	}

	public JPanel getPanel_2() {
		return panel_2;
	}

	public void setPanel_2(JPanel panel_2) {
		this.panel_2 = panel_2;
	}

}
